﻿//-----------------------------------------------------------------------
// <copyright file="Member.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the Member class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Engine.Models.ClosedWorld
{
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Windows.Markup;
    using Collections;

    /// <summary>
    /// Represents a .NET type member used within the runtime model.
    /// </summary>
    [ContentProperty("Parameters")]
    public class Member : ElementBase
    {
        /// <summary>
        /// Initializes a new instance of the Member class.
        /// </summary>
        public Member()
        {
            this.Parameters = new Parameters();
        }

        /// <summary>
        /// Gets or sets the kind of .NET type member (e.g., property, method).
        /// </summary>
        public MemberKind Kind { get; set; }

        /// <summary>
        /// Gets or sets the visibility specifier of the .NET type member.
        /// </summary>
        public MemberVisibility Visibility { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the .NET member is marked as static.
        /// </summary>
        public bool IsStatic { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the .NET member is marked as virtual.
        /// </summary>
        public bool IsVirtual { get; set; }

        /// <summary>
        /// Gets a collection of parameter information for the .NET member.
        /// </summary>
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public IList<Parameter> Parameters { get; private set; }
    }
}
